package com.igeekhome.controller;

import com.igeekhome.pojo.BaseDict;
import com.igeekhome.service.IDiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @ClassName SystemController
 * @Author admin(Wang)
 * @Date 2020/3/2 20:57
 * @Description TODO
 */
@Controller
@RequestMapping("/page")
public class CustServiceController {
    
    @Value("${PROBLEM_TYPE}")
    private String PROBLEM_TYPE;
    
    @Autowired
    private IDiceService diceService;
    
    /**
     * 问题件查询
     * @return
     */
    @RequestMapping("/proList")
    public String proSearch() {
        return "/pages/custService/proList";
    }
    
    /**
     * 问题件登记
     * @return
     */
    @RequestMapping("/proLogin")
    public String proLogin(Model model, HttpSession session) {
        List<BaseDict> problemTypes = diceService.selectByTypeCode(PROBLEM_TYPE);
        model.addAttribute("problemTypes",problemTypes);
        return "/pages/custService/proLogin";
    }
    
    /**
     * 问题件处理
     * @return
     */
    @RequestMapping("/proHander")
    public String proHander() {
        return "/pages/custService/proHanderList";
    }
    
    /**
     * 问题件处理
     * @return
     */
    @RequestMapping("/proHand")
    public String proHand() {
        return "/pages/custService/proHander";
    }
    
    /**
     * 问题件查询
     * @return
     */
    @RequestMapping("/proQuery")
    public String proQuery() {
        return "/pages/custService/proQueryList";
    }
    
   
    
}
